package edu.bbu.bibliospring.common.dto;

import java.util.Date;

/**
 * Created by anna on 6/5/14.
 */
public class ReservationDto extends DataTransferObject {

    private static final long serialVersionUID = 1L;
    private Long id;
    private BookDto book;
    private ProfileDto reserver;
    private LocationDto reservedFrom;
    private Date reservedSince;
    private Date reservedUntil;

    public ReservationDto() {super(ReservationDto.class.getName());}

    public ReservationDto(String modelClass) {
        super(modelClass);
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public BookDto getBook() {
        return book;
    }

    public void setBook(BookDto book) {
        this.book = book;
    }

    public ProfileDto getReserver() {
        return reserver;
    }

    public void setReserver(ProfileDto reserver) {
        this.reserver = reserver;
    }

    public LocationDto getReservedFrom() {
        return reservedFrom;
    }

    public void setReservedFrom(LocationDto reservedFrom) {
        this.reservedFrom = reservedFrom;
    }

    public Date getReservedSince() {
        return reservedSince;
    }

    public void setReservedSince(Date reservedSince) {
        this.reservedSince = reservedSince;
    }

    public Date getReservedUntil() {
        return reservedUntil;
    }

    public void setReservedUntil(Date reservedUntil) {
        this.reservedUntil = reservedUntil;
    }

    @Override
    public String toString() {
        return "ReservationDto [id=" + this.id + ", book=" + this.book.getTitle() + ", reserver=" + this.reserver.getFirstName() + " " + this.reserver.getLastName()
                + ", reservedFrom=" + this.reservedFrom.getLibraryName() + ", reservedSince=" + this.reservedSince.toString() + ", reservedUntil=" + this.reservedUntil.toString() + "]";
    }
}
